import request from '@/utils/request'

// 获取河南省天气数据
export function getWeatherInfo(cityName) {
  return request({

    url: '/zsy/GraphDataController/getWeatherInfo/',
    method: 'get',
    params: {
      cityName: cityName
    }
  })
}

//作用未知
export function getProvinceQuery(regionId) {
  return request({

    url: '/zsy/map/getProvinceQuery/',
    method: 'post',
    params: {
      regionId: regionId
    }
  })
}

// 获取项目日月年累计发电、上网、用电量以及环保数据
export function getRegionPowerData(data) {
  return request({

    url: '/zsy/mainController/getRegionPowerData',
    method: 'get',
    data: data
  })
}

// 获取日期范围内每日的发电量、上网电量、用电量数据
export function getMonthPowers(data) {
  return request({

    url: '/zsy/mainController/getMonthPowers',
    method: 'get',
    data: data
  }).then(res => { return JSON.parse(res.jsonStr) })
}

// 获取项目下所有光伏电站的属性信息
export function mapData(provinceIds) {
  return request({

    url: '/zsy/changqingMainController/mapData/',
    method: 'post',
    params: {
      provinceIds: provinceIds
    }

  })
}
//获取场站发电量排名
export function getUnitPower10YCData(par) {
  return request({

    url: `/zsy/getTop10Controller/getUnitPower10YCData?regionId=${par.regionId}&regionType=${par.regionType}&topOrDownType=${par.topOrDownType}&startDate=${par.startDate}&endDate=${par.endDate}`,
    method: 'post',
  });
}
//获取电站通信情况和对应的电站数量
export function getWarnNumber(data) {
  return request({

    url: '/zsy/mainController/getWarnNumber',
    method: 'post',
    params: {
      ...data
    }
  })
}
//所有电站装机规模
export function getStationStatCount(data) {
  return request({

    url: '/zsy/mainController/getStationStatCount',
    method: 'post',
    params: {
      ...data
    }
  })
}
//个人信息
export function profile() {
  return request({

    url: '/system/user/profile',
    method: 'get',

  })
}
//获取区县乡镇电站

export function getStationList(par) {
  return request({

    url: `/zsy/monitoringController/getStationList?regionType=${par.regionType}&regionId=${par.regionId}&dataType=${par.dataType}&orderName=${par.orderName}&orderType=${par.orderType}&statType=${par.statType}&stationName=${par.stationName}&dayTime=${par.dayTime}&flag=${par.flag}&topOrDownType=${par.topOrDownType}&rows=${par.rows}&start=${par.start}&page=${par.page}`,
    method: 'post',
  })
}

export function getAlarm(param) {
  return request({

    url: '/dbedit/warnRecord/getWarnInfoListByOrgan',
    params: param
  })
}




